import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class VideoBean {
  String id;
  String name;
  String videoPath;
  String coverPath;
  String createDate;
  int createTime;
  int creatorId;
  String creatorName;
  int creatorDeptId;
  String creatorDeptName;
  String size;
  String length;

  VideoBean(
      {this.id,
      this.name,
      this.videoPath,
      this.coverPath,
      this.createDate,
      this.createTime,
      this.creatorId,
      this.creatorName,
      this.creatorDeptId,
      this.creatorDeptName,
      this.size,
      this.length});

  VideoBean.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    videoPath = json['videoPath'];
    coverPath = json['coverPath'];
    createDate = json['createDate'];
    createTime = json['createTime'];
    creatorId = json['creatorId'];
    creatorName = json['creatorName'];
    creatorDeptId = json['creatorDeptId'];
    creatorDeptName = json['creatorDeptName'];
    size = json['size'];
    length = json['length'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['videoPath'] = this.videoPath;
    data['coverPath'] = this.coverPath;
    data['createDate'] = this.createDate;
    data['createTime'] = this.createTime;
    data['creatorId'] = this.creatorId;
    data['creatorName'] = this.creatorName;
    data['creatorDeptId'] = this.creatorDeptId;
    data['creatorDeptName'] = this.creatorDeptName;
    data['size'] = this.size;
    data['length'] = this.length;
    return data;
  }
}
